/*
 * Metaverse Core
 * Copyright (C) 2010 Vyacheslav Vorobyov, All rights reserved.
 * See LICENSE for full license information.
 */
package org.metaverse.warehouse;

import java.net.URL;
import java.util.Iterator;

import org.openrdf.model.Resource;
import org.openrdf.model.Statement;
import org.openrdf.model.ValueFactory;

/**
 * This is a service interface to allow user to assert or retire statements.
 * This interface is intended to use for a relatively small collections of 
 * statements, for large data modifications see a bulk uploader API.
 * 
 * @see BulkUploader
 * 
 * @author vjache
 *
 */
public interface Uploader {
	ValueFactory getValueFactory();
	/**
	 * Add a statements to the contexts specified. 
	 * @param aStatements - a collection of statements.
	 * @param aContexts - a contexts to add to
	 */
	void assertStatements(Iterator<Statement> aStatements, Resource... aContexts) throws WarehouseException;
	void assertStatements(URL aStatements, Resource... aContexts) throws WarehouseException;
	/**
	 * Remove a statements from the contexts specified. 
	 * @param aStatements - a collection of statements.
	 * @param aContexts - a contexts to remove from
	 */
	void retireStatements(Iterator<Statement> aStatements, Resource... aContexts) throws WarehouseException;
	void retireStatements(URL aStatements, Resource... aContexts) throws WarehouseException;
}
